<!--  -->
<template>
  <div>
     <Suspense>
       <template #default>
         <Child></Child>
        </template>
        <template #fallback>
           <div>
            正在加载中...
           </div>
        </template>
     </Suspense>
   
  </div>
</template>

<script lang='ts' setup>
import {Suspense,defineAsyncComponent} from 'vue'
//异步加载组件
const Child= defineAsyncComponent(()=>import('../../components/SuspenseCom.vue'));
//  import SuspenseCom from '../../components/SuspenseCom.vue';
</script>
<style scoped>
</style>